/* 
 * File:   Board.cpp
 * Author: rc
 * 
 * Created on May 27, 2010, 5:09 PM
 */

#include <cassert>
#include <iostream>
#include "headers/Board.h"

using namespace std;

Board::Board() {    
    for(int i = 0; i<23;i++) {        
        triangle p;
        p.first = Board::NEUTRAL;
        p.second = 0;
        mTriangles[i] = p;
        
    }
}

Board::Board(const Board& orig) {
}

Board::~Board() {
}

/*
 * color is the color of the piece.
 * index is the triangle on which the
 * piece is to be placed.
 */
//void Board::addPiece(Colors color, int index) {
//    cout << "second before adding is:" << mTriangles[index].second << endl;
//    mTriangles[index].first = color;
//    mTriangles[index].second += 1;
//}
//
//
//void Board::removePiece(int index) {
//    assert(mTriangles[index].second > 0);
//    mTriangles[index].second--;
//}
//
//
//void Board::movePiece(int src, int dest) {
//   //move from source-triangle to dest triangle
//    //by calling add- and- removePiece.
//}


/*
 * Returns the triangle at the given location (triIndex).
 * triIndex has to be less- or- equal to 23, where 23 is the last
 * triangle and 0 is the first.
 * The triangle is returned as typedeffed in Board.h.
 *
 */
//Board::triangle* Board::getTriangleData(int triIndex) const {
//    assert(triIndex <= 23);
//    return mTriangles[triIndex];
//}

Board::triangle* Board::getTriangles() {
    triangle *t;
    t = mTriangles;
    return t;
}

